using System;
using System.Collections.Generic;
using System.Text;
using AJAXServiceProxyGeneration;
using System.IO;

namespace AJAXServiceProxyGenerator
{
    /// <summary>
    /// Performs the generation.
    /// </summary>
    class Program
    {
        static void Main(string[] args)
        {
            try
            {
                //TODO: These should be arguments
                string wsdlUri = "http://localhost:51750/SampleWebSite/sampleservice.asmx?wsdl";
                string path =Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "../../../Sample.ClientScripts/Services");
                string ns = "SampleNs";
                
                ScriptSharpGenerator serviceGenerator   = new ScriptSharpGenerator(ns,ns, wsdlUri,"");
                serviceGenerator.POCOClassGeneratorWriter        = new GeneratorFileWriter(path);
                serviceGenerator.Generate();                

            }
            catch(Exception ex)
            {
                Console.Error.WriteLine("Unable to Generate");
                Console.Error.WriteLine(ex);
                Console.ReadLine();
            }

        }
    }
}
